﻿@using KelonProud
@using KelonProud.Mvc.Models
@model  KelonProud.Mvc.Models.DropDownTreeModel
    
@{
    var requirdMessage = Model.IsRequired ? (Model.ErrorMessage.HasValue() ? Model.ErrorMessage : "{0}必须选择".FormatWith(Model.Name)) : "";
}


<div class='input-group dropdown'>
    <input type='hidden' id='@Model.Name' name='@Model.Name' value='@Model.Value' />
    <input type="text" id="text_@Model.Name" name="text_@Model.Name" readonly="readonly" class="form-control  dropdown-toggle validate" data-toggle="dropdown" data-val="true"  data-val-required="@requirdMessage"/>
    <div id='dropDownTree_@Model.Name' class='dropdown-menu  col-xs-12'>
        <ul id='zDropDownTree_@Model.Name' class='ztree dropdown-tree' data-name="@Model.Name" data-url="@Model.Url" data-cascade="@Model.IsCheckCascade" data-milti="@Model.IsMilti" data-callbackevent="@Model.CallbackEvent"></ul>
    </div>
    <span class='input-group-btn  dropdown-toggle' data-toggle="dropdown">
        <button type="button" id='btn_@Model.Name' class="btn btn-default">
            <span class="caret"></span>
        </button>
    </span>
</div>

